Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

241
Vistas
HTML Canvas 2D context "Uncaught DOMException" Firefox

I have a Javascript function:

function drawSheaf(word_sheaf) {
    pageOffset = (parseInt(word_sheaf.page_number, 10) - 1) * PAGE_OFFSET_MULTIPLIER;

    console.log(CTX);
    CTX.beginPath();
    CTX.fillStyle='black';
    CTX.fillText(word_sheaf.word, word_sheaf.x_small/SCALING_FACTOR, word_sheaf.y_big/SCALING_FACTOR + pageOffset);
}

Which is resulting in the following console output:

Page loaded main.js:25:13
CanvasRenderingContext2D { canvas: canvas#canvas, mozCurrentTransform: (6) […], mozCurrentTransformInverse: (6) […], mozTextStyle: "12px Arial", mozImageSmoothingEnabled: true, globalAlpha: 1, globalCompositeOperation: "source-over", strokeStyle: "#000000", fillStyle: "#000000", filter: "none" }
editor.js:93:13
Uncaught DOMException: An exception was thrown editor.js:94
Uncaught DOMException: An exception was thrown editor.js:13
Use of mozImageSmoothingEnabled is deprecated. Please use the unprefixed imageSmoothingEnabled property instead. localhost:8004

Line 94 is CTX.beginPath()

Line 13 is in another function. In that case CTX.rect is the offending call.

How do you debug an error like this? The only hint here is the deprecation warning. But that's (a) a warning not an error and (b) not part of the DOMException. Expanding the DOMException only shows the code path to arrive there. I don't see an exception name or code.

enter image description here

The function runs fine on Chrome and draws the word as expected.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda